package cn.com.surker.production.entity;

import cn.com.surker.base.BaseEntity;
import cn.com.surker.enums.StateEnum;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 生产合同关联车辆表
 * </p>
 *
 * @author admin
 * @since 2024-09-04
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("production_tran_con_car")
public class TranConCar extends BaseEntity implements Serializable {

	private static final long serialVersionUID = 1L;


	public TranConCar() {
	}

	public TranConCar(Long orgId, Long proConId, Long tranCarId, String startTime, String endTime,
					  String code, String remark, String creator) {
		this.orgId = orgId;
		this.proConId = proConId;
		this.tranCarId = tranCarId;
		this.code = code;
		this.remark = remark;
		this.creator = creator;
		this.startTime = startTime;
		this.endTime = endTime;
		this.status = StateEnum.ENABLED.getCode();
		this.createTime = new Date();
	}

	/**
	 * 标识
	 */
	@TableId(value = "id", type = IdType.AUTO)
	private Long id;

	/**
	 * 公司ID
	 */
	private Long orgId;

	/**
	 * 车辆自编号
	 */
	private String code;

	/**
	 * 合同id
	 */
	private Long proConId;

	/**
	 * 运输车辆id(关联production_tran_car表)
	 */
	private Long tranCarId;

	/**
	 * 有效期开始时间
	 */
	private String startTime;

	/**
	 * 有效期截止时间
	 */
	private String endTime;

	/**
	 * 车辆类型0:轻量化1:中车2:大车
	 */
	private Integer modelType;


}
